import { createRouter, createWebHashHistory } from 'vue-router';

// 导入 Home 组件
import Home from '../views/Home/index.vue';

// 动态引入其他组件
const SystemStatus = () => import('../views/SystemStatus/index.vue');
const ProjectManagement = () => import('../views/ProjectManagement/index.vue');
const InstanceManagement = () => import('../views/InstanceManagement/index.vue');
const ApiDocs = () => import('../views/ApiDocs/index.vue');
const InstanceDemo = () => import('../views/InstanceDemo/index.vue');

const routes = [
  {
    path: '/',
    name: 'home',
    component: Home
  },
  {
    path: '/system-status',
    name: 'system-status',
    component: SystemStatus
  },
  {
    path: '/project-management',
    name: 'project-management',
    component: ProjectManagement
  },
  {
    path: '/instance-management',
    name: 'instance-management',
    component: InstanceManagement
  },
  {
    path: '/api-docs',
    name: 'api-docs',
    component: ApiDocs
  },
  {
    path: '/instance-demo',
    name: 'instance-demo',
    component: InstanceDemo
  }
  // 添加更多路由...
];

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes
});

export default router;